package com.Business;

import java.rmi.RemoteException;
import java.util.List;

import javax.ejb.Remote;

import com.Entity.Article;
import com.Entity.CompanyUser;
import com.Entity.Faq;
import com.Entity.Feedback;

@Remote
public interface GenericSessionRemote {
	
	//Check login credentials
	public CompanyUser validateLogin(
			String loginCode, 
			String password) 
	throws RemoteException;

	//Update user's profile, password
	public boolean updateProfile(CompanyUser companyUser) throws RemoteException;
	
	
	
	//For administrator and technician only
	public boolean createArticle(Article article) throws RemoteException;
	
	public List<Article> retrieveArticleList(int userID) throws RemoteException;
	
	public boolean updateArticle(Article article) throws RemoteException;

	public boolean deleteArticle(int articleID) throws RemoteException;
	
	public Article readArticle (int articleID) throws RemoteException;//Can be used by Employee
	
	public boolean rateArticle(int articleID, int stars) throws RemoteException;//Can be used by Employee
	
	
	
	public List<Faq> retrieveFaqList() throws RemoteException;			//FAQ
																		//and Feedback
	public Faq readFaq (int faqID) throws RemoteException;				//Methods
	
	public boolean sendFeedback(Feedback feedback) throws RemoteException;
	
}
